/*
========================================================================
 Name        : SysSettingListSettings.cpp
 Author      : shitou
 Copyright   : Your copyright notice
 Description : 
========================================================================
*/
/**
 *	Generated helper class which manages the settings contained 
 *	in 'SysSettingList'.  Each CAknSettingItem maintains
 *	a reference to data in this class so that changes in the setting
 *	item list can be synchronized with this storage.
 */
 
// [[[ begin generated region: do not modify [Generated Includes]
#include <e32base.h>
#include <stringloader.h>
#include <barsread.h>
#include <TaobaoMobile.rsg>
#include "SysSettingListSettings.h"
// ]]] end generated region [Generated Includes]

/**
 * C/C++ constructor for settings data, cannot throw
 */
TSysSettingListSettings::TSysSettingListSettings()
	{
	}

/**
 * Two-phase constructor for settings data
 */
TSysSettingListSettings* TSysSettingListSettings::NewL()
	{
	TSysSettingListSettings* data = new( ELeave ) TSysSettingListSettings;
	CleanupStack::PushL( data );
	data->ConstructL();
	CleanupStack::Pop( data );
	return data;
	}
	
/**
 *	Second phase for initializing settings data
 */
void TSysSettingListSettings::ConstructL()
	{
	// [[[ begin generated region: do not modify [Generated Initializers]
		{
		HBufC* text = StringLoader::LoadLC( R_SYS_SETTING_LIST_SERVER_ADDRESS );
		SetServerAddress( text->Des() );
		CleanupStack::PopAndDestroy( text );
		}
	SetPort( 80 );
	SetRemberPassword( 1 );
	SetAutoLogin( 1 );
	SetIAPSetting( -1 );
	// ]]] end generated region [Generated Initializers]
	
	}
	
// [[[ begin generated region: do not modify [Generated Contents]
TDes& TSysSettingListSettings::ServerAddress()
	{
	return iServerAddress;
	}

void TSysSettingListSettings::SetServerAddress(const TDesC& aValue)
	{
	if ( aValue.Length() < KServerAddressMaxLength)
		iServerAddress.Copy( aValue );
	else
		iServerAddress.Copy( aValue.Ptr(), KServerAddressMaxLength);
	}

TInt& TSysSettingListSettings::Port()
	{
	return iPort;
	}

void TSysSettingListSettings::SetPort(const TInt& aValue)
	{
	iPort = aValue;
	}

TBool& TSysSettingListSettings::RemberPassword()
	{
	return iRemberPassword;
	}

void TSysSettingListSettings::SetRemberPassword(const TBool& aValue)
	{
	iRemberPassword = aValue;
	}

TBool& TSysSettingListSettings::AutoLogin()
	{
	return iAutoLogin;
	}

void TSysSettingListSettings::SetAutoLogin(const TBool& aValue)
	{
	iAutoLogin = aValue;
	}

TInt& TSysSettingListSettings::IAPSetting()
	{
	return iIAPSetting;
	}

void TSysSettingListSettings::SetIAPSetting(const TInt& aValue)
	{
	iIAPSetting = aValue;
	}

// ]]] end generated region [Generated Contents]

